curl --request PATCH \
--url https://app.masivo.ai/api/storefront/v1/customers/{id}/identify/anonymous \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Smith",
"email": "[email protected]",
"new_id": "<string>",
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"tags": {},
"devices": [
{
"device_token": "<string>",
"device_info": {
"platform": "ios",
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"email_status": "VALID",
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metadata": {}
}
'{
"data": {
"customer": {
"id": "<string>",
"name": "John Smith",
"email": "[email protected]",
"registration_date": "2023-11-07T05:31:56Z",
"status": "ACTIVE",
"is_anonymous": false,
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": {},
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metrics": {},
"metadata": {}
},
"wallet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"totals": [
{
"total": 127.6,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "2023-11-07T05:31:56Z",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
}
}
]
}
}
}Identify an anonymous customer by providing their real information. This endpoint converts an anonymous customer to a regular customer. The customer must have been created with is_anonymous: true. Optionally, you can provide a new_id to change the customer’s ID during identification.
curl --request PATCH \
--url https://app.masivo.ai/api/storefront/v1/customers/{id}/identify/anonymous \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Smith",
"email": "[email protected]",
"new_id": "<string>",
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"tags": {},
"devices": [
{
"device_token": "<string>",
"device_info": {
"platform": "ios",
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"email_status": "VALID",
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metadata": {}
}
'{
"data": {
"customer": {
"id": "<string>",
"name": "John Smith",
"email": "[email protected]",
"registration_date": "2023-11-07T05:31:56Z",
"status": "ACTIVE",
"is_anonymous": false,
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": {},
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metrics": {},
"metadata": {}
},
"wallet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"totals": [
{
"total": 127.6,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "2023-11-07T05:31:56Z",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
}
}
]
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The current customer unique identifier (the anonymous ID)
Schema for identifying an anonymous customer. Converts an anonymous customer to a regular customer with real information.
The full name of the customer
"John Smith"
The email of the customer
Optional new customer ID to replace the anonymous ID
The gender of the customer
MALE, FEMALE The date of birth of the customer
The document type of the customer. If provided, document_number is required.
The document number of the customer. If provided, document_type is required.
50The country of the customer
100Include your conditions customer tags here
Customer devices for push notifications
Show child attributes
The unique token that identifies the device
Optional information about the device
The date when the device token expires
The date when the device was registered
The email status of the customer
VALID, BOUNCED, UNSUBSCRIBED, COMPLAINED The customer's consent preferences
Show child attributes
IAB TCF consent string in base64url format, starting with 'CO', minimum 20 characters, maximum 500 characters
20 - 500"COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA"
IAB TCF version
"2.0"
The timestamp when consent was given
The customer unique identifier
Show child attributes
Consent for behavioral campaigns
Consent for coupon campaigns
Consent for punchcard campaigns
Consent for email marketing
Consent for push notifications
Consent for link tracking
The metadata of the customer
Customer identified successfully
Show child attributes
Show child attributes
Your customer unique identifier
The full name of the customer
"John Smith"
The email of the customer
The date when the customer was registered
The status of the customer
ACTIVE, INACTIVE Whether the customer is anonymous
The gender of the customer
MALE, FEMALE The date of birth of the customer
The document type of the customer
The document number of the customer
50The country of the customer
100The id of the tier the customer currently belongs to
Include your conditions customer tags here
The customer's consent preferences
Show child attributes
IAB TCF consent string in base64url format, starting with 'CO', minimum 20 characters, maximum 500 characters
20 - 500"COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA"
IAB TCF version
"2.0"
The timestamp when consent was given
The customer unique identifier
Show child attributes
Consent for behavioral campaigns
Consent for coupon campaigns
Consent for punchcard campaigns
Consent for email marketing
Consent for push notifications
Consent for link tracking
The metrics of the customer
The metadata of the customer
Show child attributes
The wallet internal unique identifier
The customer internal unique identifier
Each line represents a batch of a given reward_id that expires at the same time
Show child attributes
The amount of the line
The reward id of the line
The campaign id of the line
The id of the brand that originated the line
The date when the line was issued
The expiration date of the line
The reservation expiration date of the line
The wallet totals by reward
Show child attributes
The total amount of the reward
127.6
The reward id of the total
The expiration date of the total
Show child attributes
The reward internal unique identifier
The brand id of the reward, null if is a global reward
The name of the reward
The description of the reward
The type of the reward
POINTS, DISCOUNT, GIFT_CARD, PRODUCT OR conditions
AND conditions
Show child attributes
The type of the condition
"Order Value"
The operator to compare the attribute
"grater than"
The primitive of the value to compare
string, number, currency, boolean, absolute date, relative date, recurring date The value to compare
9.95